<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="templates/FoodSageTemplateUnauthenticated.xhtml">

    <ui:define name="main_menu">
        <f:view beforePhase="#{indexManagedBean.initView}" ></f:view>
        <p:menubar model="#{indexManagedBean.touristMainMenuModel}"/>
    </ui:define>

    <ui:define name="content">     

        <p:panel id="panel" header="#{bundle['forgotpassword.label']}" style="margin-bottom:10px;">  
            <p:messages />  
            <h:panelGrid columns="3" cellpadding="5">  
                <h:outputLabel id="usernameLabel" value="#{bundle['password.touristusername.label']}"/>  
                <h:inputText id="username" value="#{touristForgotPasswordManagedBean.username}" required="true" requiredMessage="#{bundle['password.touristusername.required']}"/>
                <p:message for="username"/>

                <h:outputLabel id="birthdateLabel" value ="#{bundle['password.birthdate.label']}"/>
                <p:calendar id="birthdate" value="#{touristForgotPasswordManagedBean.birthdate}" showOn="button" showButtonPanel="true" navigator="true" required="true" requiredMessage="#{bundle['password.birthdate.required']}" pattern="yyyy-MM-dd" />
                <p:message for="birthdate"/>
            </h:panelGrid>
            <br/>
            <h:panelGrid columns="1">
                <h:column>
                    <h:commandLink id="reset_password" value ="#{bundle['resetpassword.label']}" action="#{pageRedirectorBean.goTouristResetPassword}" immediate="true"/>
                </h:column>
            </h:panelGrid>
            <br/>
            <p:commandButton id="submit" value="#{bundle['password.submit.button']}" update="panel" actionListener="#{touristForgotPasswordManagedBean.requestPassword}"/>
        </p:panel>    
    </ui:define>  
</ui:composition>

